﻿using App.API.BaseFilter;
using App.API.Security;
using App.IBLL;
using APP.DTO;
using Microsoft.AspNetCore.Mvc;

namespace App.API.Controllers
{
    [Route("API/[Controller]/[Action]")]
    [ApiController]
    public class LoginController : APIControllerBase
    {

        public LoginController()
        {

        }
        [HttpPost]
        public HandleResult LoginUser()
        {
            string userName = "admin001";
            string token = JWTTokenContext.GetToken(userName);
            return new HandleResult { Result = token };
        }

        [HttpPost]
        public HandleResult TestJWT()
        {
            Console.WriteLine(RequestMACAddress);
            Console.WriteLine(RequestToken);
            return new HandleResult { Result = "返回测试结果" };
        }
    }
}
